package com.tungse.study.scheedule;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Tungse
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Job implements Comparable<Job> {

    private Runnable task;
    private long startTime;
    private long period;

    @Override
    public int compareTo(Job o) {
        return Long.compare(this.startTime, o.startTime);
    }
}
